package io.github.burukeyou.dataframe.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;

public class JSONUtil {
    public static boolean isValidArray(String json) {
        if (json == null || json.trim().isEmpty()) {
            return false;
        }
        try {
            Object parsed = JSON.parse(json);
            // 判断是否为数组类型
            return parsed instanceof JSONArray;
        } catch (JSONException e) {
            return false;
        }
    }
}

